"""
# -*- coding: utf-8 -*-
Time    : 2025/7/28 下午4:15
Author  : Micah
File    : test_weixin_create_tag.py
Function:
"""
import pytest
import requests
import yaml
import allure


@pytest.mark.parametrize('create', yaml.safe_load(open('data/weixin_create_tag.yml')))
def test_create_tag(get_access_token, create):
    url = create['URL'] + get_access_token1
    json_data = create['data']
    result = create['result']['name']
    res = requests.post(url, json=json_data)
    assert res.status_code == 200
    assert res.json()['tag']['name'] == result
